package com.itheima.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.domain.Menu;
import com.itheima.vo.MenuVo;
import com.itheima.vo.PageBeanVo;

import java.util.List;

/**
 * <p>
 * 后台菜单表 服务类
 * </p>
 *
 * @author fukeke
 * @since 2022-11-11
 */
public interface IMenuService extends IService<Menu> {
    //查询所有菜单
    List<Menu> findAll();

    //根据id查询菜单
    Menu findById(Long menuId);

    //树形结构返回所有菜单列表
    List<MenuVo> findTreeList();

    //根据父级菜单id分页查询菜单
    PageBeanVo findByParentId(Long parentId, Integer pageNum, Integer pageSize);

    //添加菜单
    void saveMenu(Menu menu);

    //根据id删除菜单
    Boolean deleteMenu(Long id);

    //修改菜单
    void updateMenu(Menu menu);
}
